/*
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2023-12-05 23:26:52
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2023-12-26 15:18:16
 * @FilePath: /ruoyi-ui/mock/state.mock.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const Mock = require("mockjs");
const Random = Mock.Random;
const { response, initData, Paginator } = require("./common.js");
function localList(req, res) {
  const mockData = response(
    {
      list: initData(
        {
          idNumber: Random.id(),
          name: Random.cname(),
          gender: Random.integer(0,1),
          age: Random.integer(10, 100),
          address: Random.county(true),
          nation: "汉族",
          audienceCategory: Random.integer(1,8),
          contactNumber: Mock.mock(/^1[345789]\d{9}$/),
          school: Random.cname(),
          className: Random.cname(),
          templeName: Random.cname(),
          isAdded: Random.integer(0,1),
        },
        10
      ),
      pagination: new Paginator(50, 1, 10)
    }
  );

  res.json(mockData);
}


module.exports = {
  localList,
};
